import request from "@/utils/request";

/**
 * 组织分页查询
 * @param {*} params 
 * @returns 
 */
export function organizationsPageQuey(params) {
    return request({
        url: "/admin/organizations/pageQuery",
        method: 'post',
        data: params
    })
}

/**
 * 删除组织
 * @param {*} param 
 * @returns 
 */
export function organizationsDelete(param) {
    return request({
        url: `/admin/organizations/delete/${param}`,
        method: 'delete'
    })
}

/**
 * 创建组织
 * @param {*} params 
 * @returns 
 */
export function organizationsCreate(params) {
    return request({
        url: "/admin/organizations/add",
        method: 'post',
        data: params
    })
}

/**
 * 编辑组织
 * @param {*} param 
 * @param {*} params 
 * @returns 
 */
export function organizationsEdit(param, params) {
    return request({
        url: `/admin/organizations/update/${param}`,
        method: 'put',
        data: params
    })
}

/**
 * 获取全部组织
 * @returns 
 */
export function getAllOrganizations() {
    return request({
        url: "/admin/organizations/getAll",
        method: 'get'
    })
}